<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
         <style>
            p{
                text-align: center;
            }
            #a{
                background-color:black;
                color: white;

                

            }
               h1{
                background-color: black;
                color: #f4f4f4;
               }
               h1 p {
                color: #F0AD4E;
               }
         </style>
    </head>
   
         <h1>WHITE &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        首页 关于 照片集 服务 微博 联系 登录</h1>
    
        <p>账号：&nbsp;<input type="zhanghao" id="zhanghao" placeholder="账号"></p>
         <p>密码：&nbsp;<input type="mima" id="mima" placeholder="密码"></p>
        <p > <button onclick="login()" id="a">登&nbsp;录 </button></p>
    </body>
    <script>
    
          
             function login(){
                const zhanghao = document.getElementById('zhanghao').value;
              const mima = document.getElementById('mima').value;
                if(zhanghao===''){
                         alert('账号不为空');
                         return;
              }else if(zhanghao.length<3&&mima.length<3){
                           alert('账号长度至少为3');
                           return;
              }else if(mima===''){
                         alert('密码不能为空');
                         return;
              } else if(zhanghao.length<6&&mima.length<6){
                          alert('账号或者密码至少为6');
                          return;
                          
              } else if(zhanghao==='admin'&& mima==='123456'){
                        location.href="djbj.html" ;  
              } else {
                   alert('账号或者密码错误');
              }
              
            }
    </script>
</html>